import request from '../../request'

const Api = {
  page: '/api/adminstu/stuTranscriptAdd/page',
  save: '/api/adminstu/stuTranscriptAdd/save',
  remove: '/api/adminstu/stuTranscriptAdd/remove',
  details: '/api/adminstu/stuTranscriptAdd/selectById',
  update: '/api/adminstu/stuTranscriptAdd/update',

  stuPage: '/api/adminstu/stuBusp/page',
  signUpPage: '/api/adminstu/stuOrderCourse/page',
  upateCourSts: '/api/adminstu/stuOrderCourse/upateCourSts',
  upateCreditSts: '/api/adminstu/stuOrderCourse/upateCreditSts',
  upateRegSts: '/api/adminstu/stuOrderCourse/upateRegSts',

  coursePage: '/api/admincourseBasicInformation/courseBasicInformation/page',
  upload: '/api/sys/oss/upload',
}

// 分页数据
export const page = params => {
  return request.request({
    url: Api.page,
    params,
    method: 'GET'
  })
}
// 招聘的分页
export const signUpPage = params => {
  return request.request({
    url: Api.signUpPage,
    params,
    method: 'GET'
  })
}
// 修改认证状态
export const upateCourSts = data => {
  return request.request({
    url: Api.upateCourSts,
    data,
    method: 'POST'
  })
}
// 修改上课状态
export const upateCreditSts = data => {
  return request.request({
    url: Api.upateCreditSts,
    data,
    method: 'POST'
  })
}
// 修改转学分状态
export const upateRegSts = data => {
  return request.request({
    url: Api.upateRegSts,
    data,
    method: 'POST'
  })
}

/** 保存 */
export const save = data => {
  return request.request({
    url: Api.save,
    data,
    method: 'POST'
  })
}
/** 修改数据 */
export const update = data => {
  return request.request({
    url: Api.update,
    data,
    method: 'PUT'
  })
}
/** 查询详情 */
export const details = params => {
  return request.request({
    url: Api.details,
    params,
    method: 'GET'
  })
}
/** 学生分页 */
export const stuPage = params => {
  return request.request({
    url: Api.stuPage,
    params,
    method: 'GET'
  })
}
/** 课程分页 */
export const coursePage = params => {
  return request.request({
    url: Api.coursePage,
    params,
    method: 'GET'
  })
}
/** 删除数据 */
export const remove = params => {
  return request.request({
    url: Api.remove,
    params,
    method: 'DELETE'
  })
}
/** 文件上传 */
export const upload = data => {
  return request.request({
    url: Api.upload,
    data,
    method: 'post'
  })
}
